﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VIP课程.Models
{
    internal class Person
    {
        private int age = 100;

        //Age只读的属性，读age的值
        public int Age => age;

        public void DoWork(Action action)
        {
            action.Invoke();
        }

        public void DoWork(Func<int,long > predicate) 
        {
            var result = predicate.Invoke(10);

            Console.WriteLine($"result={result}");
        }

    }
}
